#include "led.h"
#include "usrconfig.h"
#include "usrlib.h"
#include "globaldata.h"
TaskHandle_t TaskHandle_LED=NULL;
void Task_LED(void * para)
{
	u32 LedClk=1500;   //ms
	u8 simstate=0;
	u8 netregister_cgreg=0;
	para=para;
	while(1)
	{
		GDGet(OFFSET(GD,SimState),SIZEOF(GD,SimState),&simstate);
		GDGet(OFFSET(GD,NetRegisterCGREG),SIZEOF(GD,NetRegisterCGREG),&netregister_cgreg);
		if(simstate)
		{
			LedClk=500;
		}
		if(netregister_cgreg)
		{
			LedClk=150;
		}
		LED_SIG=!LED_SIG;
		vTaskDelay(pdMS_TO_TICKS(LedClk));
	}
}
























